package com.Lixiaoqian.PartyHistoryMuseum.ui;

import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Environment;
import android.os.IBinder;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.Lixiaoqian.PartyHistoryMuseum.R;

import java.io.File;

public class TestActivity extends AppCompatActivity {
    private TestActivity.conn conn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
    }

    public void vclick(View view){
        switch (view.getId()){
            case R.id.button:
                File file = new File(Environment.getExternalStorageDirectory(),
                        "voice_PHM_01.mp3");
             //   PlayService.launch(this,conn,file.getAbsolutePath());
                break;
            case R.id.button2:
              //  playBind.pause();
                break;
        }

    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        unbindService(conn);
    }

    class conn implements ServiceConnection {

        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
        }

        @Override
        public void onServiceDisconnected(ComponentName name) {

        }
    }
}
